package org.domain.mavenproject;

import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;

import org.jboss.seam.annotations.AutoCreate;
import org.jboss.seam.annotations.Name;

@Stateless @Name("user_repository")
@AutoCreate
public class UserRepositoryBean implements UserRepository {

	@PersistenceContext
	private EntityManager entityManager;
	
	public String saveDummyUser() {
		User user = new User("Maven Project");
		entityManager.persist(user);
		return user.toString();
	}
}